<!DOCTYPE html>
<html lang="en">
<head>
	<meta charset="UTF-8">
	<title>006-jQuery静态方法-each.html</title>
</head>
<body>
	<div>div1</div>
	<div>div2</div>
	<div>div3</div>
	<div>div4</div>
	<div>div5</div>
</body>
<script src="js/jquery-1.12.4.js"></script>
<script>
	/*
	var now = Date.now();
	var data = new Date();
	data.now()
	*/
	var arr1 = [1,2,5,7,9]
	var likeArr = {0:'aaa',1:'bbb',2:'ccc',length:3};
	var aDiv = document.getElementsByTagName('div')

	console.log(aDiv);
	console.log(arr1);
	
	arr1.forEach(function(item,index){
		console.log('1:::',item,index);
	});
	$.each(arr1,function(index,item){
		console.log('2:::',index,item);
	})
	// likeArr.forEach(function(item,index){
	// 	console.log('3:::',item,index);
	// })
	$.each(likeArr,function(index,item){
		console.log('4:::',index,item);
	})

	// aDiv.forEach(function(item,index){
	// 	console.log('3:::',item,index);
	// })
	$.each(aDiv,function(index,item){
		console.log("5:::",index,item);
	})
</script>
</html>